﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UBlockly.Scriptable;
using UBlockly.Compotent;

namespace UBlockly.UI
{
    public sealed class RectPacker : IRectPacker
    {
        private BlockAnchor blockAnchor;
        private ILVarType paramType;
        private uint varTypeCode;

        public BlockAnchor BlockAnchor => blockAnchor;
        public ILVarType ParamType => paramType;
        public uint VarTypeCode => varTypeCode; 

        public RectPacker(BlockAnchor anchor, string paramTypeStr)
        {
            blockAnchor = anchor;
            paramType = TranslateHelper.GetILVarTypeByVarTypeName(paramTypeStr);
            varTypeCode = TranslateHelper.GetILVarTypeCodeByVarTypeName(paramTypeStr);
        }
    }
}
